<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
    <title>BasemapGallery widget - 4.15</title>
    <link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/themes/light/main.css" />
    <style>
        html,
        body,
        #viewDiv {
            padding: 0;
            margin: 0;
            height: 100%;
            width: 100%;
        }
    </style>
    <script src="https://js.arcgis.com/4.15/"></script>
    <script>
        require([
            "esri/Map",
            "esri/views/SceneView",
            "esri/widgets/BasemapGallery"
        ], function(Map, SceneView, BasemapGallery) {
            var map = new Map({
                basemap: "gray"
            });

            var view = new SceneView({
                container: "viewDiv",
                map: map,
                center: [139.68, 35.68],
                zoom: 3
            });

            var basemapGallery = new BasemapGallery({
                view: view
            });

            // Add the widget to the top-right corner of the view
            view.ui.add(basemapGallery, {
                position: "top-right"
            });
        });
    </script>
</head>

<body>
    <div id="viewDiv"></div>
</body>

</html>